from django.db import models


class CsOrders(models.Model):
    shop_id = models.PositiveIntegerField()
    cashier_id = models.PositiveIntegerField()
    order_sn = models.CharField(max_length=36)
    bill_num = models.CharField(max_length=32)
    pay_method = models.CharField(max_length=16)
    member_id = models.PositiveIntegerField()
    goods_num = models.DecimalField(max_digits=12, decimal_places=3)
    total_price = models.DecimalField(max_digits=10, decimal_places=2)
    cart_total_price = models.DecimalField(default=0, max_digits=10, decimal_places=2)
    status = models.IntegerField(default=0)
    created = models.PositiveIntegerField()
    updated = models.PositiveIntegerField()
    deleted = models.PositiveIntegerField(default=0)

    class Meta:
        managed = False
        db_table = 'cs_orders'
